package com.sc.VenusQueryBeta.model.account.xiaofei;

import com.hengjun.kingstar.sdk.base.BaseModel;
import com.hengjun.kingstar.sdk.helper.RetrofitCreateHelper;
import com.hengjun.kingstar.sdk.helper.RxHelper;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.api.account.AccountApi;
import com.sc.VenusQueryBeta.contract.account.xiaofei.XiaoFei01Contract;
import com.sc.VenusQueryBeta.model.bean.account.CurrencyListBean;
import com.sc.VenusQueryBeta.model.bean.account.xiaofei.XiaoFei01Bean;

import io.reactivex.Observable;


/**
 * Created by Administrator on 19/10/2018.
 *
 */

public class XiaoFei01Model extends BaseModel implements XiaoFei01Contract.IXiaoFei1Model {
    @Override
    public Observable<XiaoFei01Bean> getXiaoFei1(String serverAddress, String projectName, int serverPort, int clientindex,
                                                 int start, int limit, String clientAppmsgnum, String roomth, String roomyear, String roomname) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").
                queryXiaoFei01(roomth,roomyear,start,limit,clientindex,clientAppmsgnum,roomname).compose(RxHelper.<XiaoFei01Bean>rxSchedulerHelper());
    }

    //查询币种
    @Override
    public Observable<CurrencyListBean> queryAllCurrencyList(String serverAddress, String projectName, int serverPort) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base + serverAddress + ":" + serverPort + "/" + projectName + "/").queryCurrencyList().compose(RxHelper.<CurrencyListBean>rxSchedulerHelper());

    }

    public static XiaoFei01Model newInstance() {
        return new XiaoFei01Model();
    }

}
